<% var formLeftSecitionPart = { %>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>所属栏目：</label>
			<div class="formControls col-xs-6">
			
	<select class="select" name="columnId">
	<% for(column in columnlist){ %>
		<option value="${column.id}" ${column.id==colId?"selected"}>${column.name}</option>
		<% for(child in column.childList){ %>
			<option value="${child.id}" ${child.id==colId?"selected"}>├ ${child.name}</option>
		<% } %>
	<% } %>
	</select>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>标题：</label>
			<div class="formControls col-xs-6">
				<input type="text" class="input-text" value="" id="title" name="title" datatype="*2-96" nullmsg="标题不能为空">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3">文章链接：</label>
			<div class="formControls col-xs-6">
				<input type="text" class="input-text" id="link" name="link">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>是否自定义模板：</label>
			<div class="formControls col-xs-6 skin-minimal" onclick="check_radio_uscoltpl()">
				<div class="radio-box">
					<input type="radio" id="useColTpl-0" name="useColTpl" value="0" checked="checked">
					<label for="useColTpl-0">使用栏目模板</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="useColTpl-1" name="useColTpl" value="1">
					<label for="useColTpl-1">使用自定义模板</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div id="div_tpl">
		<div class="row cl">
			<label class="form-label col-xs-3">列表模板：</label>
			<div class="formControls col-xs-3">
				<select class="select-box" id="select_tpl_list" onchange="changeTplList(this.value)" >
				<option value="0">不选择</option>
				<% for(var tplname in tplList){ %>
				<option value="${tplname.value}">${tplname.name}</option>
				<% } %>
				</select>
			</div>
			<div class="formControls col-xs-3">
				<input type="text" class="input-text" id="customListView" name="customListView">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3">内容模板：</label>
			<div class="formControls col-xs-3">
				<select class="select-box" id="select_tpl_content" onchange="changeTplContent(this.value)" >
				<option value="0">不选择</option>
				<% for(var tplname in tplList){ %>
				<option value="${tplname.value}">${tplname.name}</option>
				<% } %>
				</select>
			</div>
			<div class="formControls col-xs-3">
				<input type="text" class="input-text" id="customContentView" name="customContentView">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>是否允许评论：</label>
			<div class="formControls col-xs-6 skin-minimal">
				<div class="radio-box">
					<input type="radio" id="allowComment-1" name="allowComment" value="1" checked="checked">
					<label for="allowComment-1">是</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="allowComment-0" name="allowComment" value="0">
					<label for="allowComment-0">否</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red">*</span>是否需要审核：</label>
			<div class="formControls col-xs-6 skin-minimal">
				<div class="radio-box">
					<input type="radio" id="isAudit-1" name="isAudit" value="1">
					<label for="isAudit-1">是</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="isAudit-0" name="isAudit" value="0" checked="checked">
					<label for="isAudit-0">否</label>
				</div>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3">描述、摘要：</label>
			<div class="formControls col-xs-6">
				<textarea name="description" cols="" rows="" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="textarealength(this,100)"></textarea>
				<p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3">视频脚本：</label>
			<div class="formControls col-xs-6">
				<textarea name="videoCode" cols="" rows="" class="textarea"  placeholder="视频播放的html代码" ></textarea>
			</div>
			<div class="col-xs-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3">关键字：</label>
			<div class="formControls col-xs-6">
				<input type="text" class="input-text" id="keywords" name="keywords"  nullmsg="标题不能为空">
			</div>
			<div class="col-xs-3"> </div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3"><span class="c-red"></span>文章内容：</label>
			<div class="formControls col-xs-9">
			
              <script id="content" name="content" type="text/plain"></script>
              <script type="text/javascript" src="${STATIC}/lib/ueditor/ueditor.config.js"></script>
              <script type="text/javascript" src="${STATIC}/lib/ueditor/ueditor.all.min.js"></script>
              <script type="text/javascript">UE.getEditor('content');</script>
			
			</div>
		</div>
<%};%>
<% var formRightSecitionPart = { %>
      <div class="panel panel-default">
        <div class="panel-header">封面图片</div>
        <div class="panel-body text-c">
			<img id="fileImage" src="${IMAGEPATH}/${obj.image!}" class="img-thrum">
            <div id="fileInfo"></div>
            <div id="picker">选择图片</div>
            <span><input type="hidden" id="image" name="image"></span>
        </div>
      </div>
<%};%>
<% var jsSecitionPart = { %>
<script type="text/javascript">
var isFirstSelectList = true;
function changeTplList(v) {
	if(0==v){
		if(!isFirstSelectList)
			$("#customListView").val("");
	}else{
		$("#customListView").val("/tpl/"+v);
		isFirstSelectList = false;
	}
}
var isFirstSelectContent = true;
function changeTplContent(v) {
	if(0==v){
		if(!isFirstSelectContent)
			$("#customContentView").val("");
	}else{
		$("#customContentView").val("/tpl/"+v);
		isFirstSelectContent = false;
	}
}
function check_radio_uscoltpl(){
	var cval = $('input:radio[name=useColTpl]:checked').val();
	if(0==cval){
		$("#div_tpl").hide();
		$("#customListView").val("");
		$("#customContentView").val("");
	}else{
		$("#div_tpl").show();
	}
}

$(function(){
	check_radio_uscoltpl();
	uploadImage("picker","fileImage","fileInfo","image");
});
</script>
<%};
  include("/admin/inc/layout_add.html",{
  	baseUrl:BASE+'/admin/cms/article',
  	entityName:'文章',
  	isUpload:false,
  	formLeftSecition:formLeftSecitionPart,
  	formRightSecition:formRightSecitionPart,
  	jsSecition:jsSecitionPart
  }){}
 %>